package com.longshine.plc.ui;

import javax.swing.AbstractListModel;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JScrollPane;
import org.jdesktop.layout.GroupLayout;
import org.jdesktop.layout.GroupLayout.ParallelGroup;
import org.jdesktop.layout.GroupLayout.SequentialGroup;

public class ClientPanel extends OwnPanel
{
  private JLabel jLabel31;
  private JList jList1;
  private JScrollPane jScrollPane2;

  public void init()
  {
    this.title = "客户端";
  }

  public ClientPanel()
  {
    initComponents();
  }

  private void initComponents()
  {
    this.jLabel31 = new JLabel();
    this.jScrollPane2 = new JScrollPane();
    this.jList1 = new JList();

    this.jLabel31.setText("客户端列表");

    this.jList1.setModel(new AbstractListModel() {
      String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };

      public int getSize() { return this.strings.length; } 
      public Object getElementAt(int i) { return this.strings[i];
      }
    });
    this.jScrollPane2.setViewportView(this.jList1);

    GroupLayout layout = new GroupLayout(this);
    setLayout(layout);
    layout.setHorizontalGroup(
      layout.createParallelGroup(1)
      .add(layout.createSequentialGroup()
      .add(51, 51, 51)
      .add(this.jLabel31)
      .add(42, 42, 42)
      .add(this.jScrollPane2, -2, 330, -2)
      .addContainerGap(-1, 32767)));

    layout.setVerticalGroup(
      layout.createParallelGroup(1)
      .add(layout.createSequentialGroup()
      .add(52, 52, 52)
      .add(layout.createParallelGroup(1)
      .add(this.jLabel31)
      .add(this.jScrollPane2, -2, 147, -2))
      .addContainerGap(101, 32767)));
  }
}